﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;

namespace Clmp.Data.DBEntity2.Sql
{
    public class SqlClientFactory : IDbClientFactory
    {
        #region IDbClientFactory 成员

        public System.Data.IDbConnection GetDbConnection()
        {
            return new SqlConnection();
        }

        public System.Data.IDbCommand GetDbCommand()
        {
            return new SqlCommand();
        }

        public System.Data.IDbDataParameter GetDataParameter(string parName, object value, System.Data.ParameterDirection direction)
        {
            return new SqlParameter("@" + parName, value) {Direction = direction};
        }

        public System.Data.IDbDataAdapter GetDbDataAdapter()
        {
            return new SqlDataAdapter();
        }

        #endregion
    }
}
